export const typeList = [
  {
    name: "功能函数",
    id: "FUNCTION"
  },
  {
    name: "筛选",
    id: "FILTER"
  },
  {
    name: "窗口",
    id: "WINDOW"
  }
];
export const EventType = [
  {
    name: "current events",
    id: "CURRENT_EVENTS"
  },

  {
    name: "all events",
    id: "ALL_EVENTS"
  },
  {
    name: "expired events",
    id: "EXPIRED_EVENTS"
  }
];
export const sortList = [
  {
    value: "升序排序",
    id: "ASC"
  },
  {
    value: "降序排序",
    id: "DESC"
  }
];
export const displacement = [
  {
    value: "snapshot",
    id: 0
  },
  {
    value: "every",
    id: 1
  },
  {
    value: "within",
    id: 2
  },
  {
    value: "events",
    id: 3
  },
  {
    value: "ALL",
    id: 4
  },
  {
    value: "LAST",
    id: 5
  },
  {
    value: "FIRST",
    id: 6
  },
  {
    value: "seconds",
    id: 7
  },
  {
    value: "minutes",
    id: 8
  },
  {
    value: "hours",
    id: 9
  },
  {
    value: "days",
    id: 10
  },
  {
    value: "months",
    id: 11
  },
  {
    value: "years",
    id: 12
  }
];
export const insert = [
  {
    name: "insert",
    id: "INSERT"
  },
  {
    name: "delete",
    id: "DELETE"
  },
  {
    name: "update",
    id: "UPDATE"
  },
  {
    name: "update_or_insert_into",
    id: "UPDATE_OR_INSERT_INTO"
  }
];
// 需要做名称校验的节点
export const streamKey = ["tableList", "windowList", "streamList"];
export const attributesTypeSele = [
  {
    value: "CUSTOM_DATA_BASED",
    label: "Static value"
  },
  {
    value: "PRIMITIVE_BASED",
    label: "Primitive based"
  },
  {
    value: "PROPERTY_BASED",
    label: "Property based"
  },
  {
    value: "REGEX_BASED",
    label: "Regex based"
  }
];
export const typeOptions = [
  {
    label: "随机的",
    value: "RANDOM_DATA_SIMULATION"
  },
  {
    label: "CSV文件",
    value: "CSV_SIMULATION"
  },
  {
    label: "数据库",
    value: "DATABASE_SIMULATION"
  }
];
// 不通类型的下拉框选项
export const propertyBasedGenerationOptionsForString = [
  "FIRST_NAME",
  "TIME_12H",
  "TIME_24H",
  "SECOND",
  "MINUTE",
  "MONTH",
  "MONTH_NUM",
  "YEAR",
  "DAY",
  "DAY_OF_WEEK",
  "DATE",
  "FULL_NAME",
  "LAST_NAME",
  "WORDS",
  "BSN",
  "ADDRESS",
  "EMAIL",
  "PHONE_NUM",
  "POST_CODE",
  "STATE",
  "CITY",
  "COMPANY",
  "COUNTRY",
  "STREET_NAME",
  "HOUSE_NO",
  "HEIGHT_CM",
  "HEIGHT_M",
  "WEIGHT",
  "OCCUPATION",
  "IBAN",
  "BIC",
  "VISA_CARD",
  "PIN_CODE",
  "URL",
  "IP",
  "IP_V6",
  "MAC_ADDRESS",
  "UUID",
  "USERNAME",
  "COLOUR",
  "ALTITUDE",
  "DEPTH",
  "COORDINATES",
  "LATITUDE",
  "LONGITUDE",
  "GEO_HASH",
  "SENTENCE",
  "PARAGRAPH"
];
export const propertyBasedGenerationOptionsForInt = [
  "YEAR",
  "SECOND",
  "MINUTE",
  "MONTH",
  "MONTH_NUM",
  "DAY",
  "DAY_OF_WEEK",
  "PHONE_NUM",
  "POST_CODE",
  "LATITUDE",
  "LONGITUDE",
  "GEO_HASH"
];

export const propertyBasedGenerationOptionsForLong = [
  "LATITUDE",
  "SECOND",
  "MINUTE",
  "MONTH",
  "MONTH_NUM",
  "YEAR",
  "DAY",
  "DAY_OF_WEEK",
  "PHONE_NUM",
  "POST_CODE",
  "HOUSE_NO",
  "PIN_CODE",
  "LONGITUDE",
  "GEO_HASH"
];

export const propertyBasedGenerationOptionsForDouble = [
  "HEIGHT_CM",
  "SECOND",
  "MINUTE",
  "MONTH",
  "MONTH_NUM",
  "YEAR",
  "DAY",
  "DAY_OF_WEEK",
  "PHONE_NUM",
  "POST_CODE",
  "HOUSE_NO",
  "HEIGHT_M",
  "WEIGHT",
  "PIN_CODE",
  "LATITUDE",
  "LONGITUDE",
  "GEO_HASH"
];

export const propertyBasedGenerationOptionsForFloat = [
  "HEIGHT_M",
  "SECOND",
  "MINUTE",
  "MONTH",
  "MONTH_NUM",
  "YEAR",
  "DAY",
  "DAY_OF_WEEK",
  "PHONE_NUM",
  "POST_CODE",
  "HOUSE_NO",
  "HEIGHT_CM",
  "WEIGHT",
  "PIN_CODE",
  "LATITUDE",
  "LONGITUDE",
  "GEO_HASH"
];
export const WORK_KEY = "工艺变量";
export const FORMULA_KEY = "配方变量";

export const spareParts = [
  "零件号",
  "工序号",
  "工步号",
  "工步名称",
  "零件名称",
  "工序名称",
  "工艺版次",
  "材料牌号",
  "委托工序号",
  "委托工序名称",
  "工序版次"
];
export const KEY_ATT = [
  "零件号",
  "零件名称",
  "工序号",
  "工序名称"
  // "工步号",
  // "工装夹具",
  // "工装中零件数",
  // "设备中工装数",
];
// token输入校验
export const TOKEN_RULES = [
  { required: true, message: "请输入标识符", trigger: "blur" },
  {
    validator(rule, value, callback) {
      var reg = /^\w+$/g;
      if (reg.test(value)) {
        callback();
      } else {
        callback(new Error("只支持字母和数字,下划线！"));
      }
    }
  },
  {
    min: 2,
    max: 30,
    message: "长度在 2 到 30 个字符",
    trigger: "blur"
  }
];
export const SYMBOL_RULES = [
  { required: true, message: "不能为空", trigger: "blur" },
  {
    validator(rule, value, callback) {
      var reg = /^(V)([1-9]\d|[1-9])(.([1-9]\d|\d)){2}$/;
      if (reg.test(value)) {
        callback();
      } else {
        callback(new Error("格式不正确,例:V1.0.1"));
      }
    }
  }
];
// version输入校验
export const VERSION_RULES = [
  { required: true, message: "请输入版次" }
  // {
  //     validator(rule, value, callback) {
  //         var reg = /^(V)([1-9]\d|[1-9])(.([1-9]\d|\d)){2}$/;
  //         if (reg.test(value)) {
  //             callback();
  //         } else {
  //             callback(new Error("格式不正确,例:V1.0.1"));
  //         }
  //     },
  // },
];
export const PREDEFINE_COLORS = [
  "#C00000",
  "#833C0B",
  "#7F6000",
  "#33531E",
  "#1F3864",
  "#7030A0",
  "#4E4E4E",
  "#FF0000",
  "#C55A11",
  "#BF9000",
  "#538135",
  "#2F5496",
  "#B370E5",
  "#828282",
  "#FF5858",
  "#ED7D31",
  "#FFC000",
  "#70AD47",
  "#3D6CC2",
  "#D09FF5",
  "#AEAEAE",
  "#FF8B8B",
  "#F4B183",
  "#FFD965",
  "#A9D18E",
  "#8EAADB",
  "#DABAF2",
  "#CCCCCC"
];
export const TENANT_TITLE = ["热处理车间集控", "锻造车间集控", "铸造车间集控"];
// 精铸厂
export const CASTING_TYPE = ["制型", "后处理", "熔注"];

export const JIEMA = "jiema";
export const JIEMA_TIMEOUT = 1700000;
export const JIEMA_USERNAME_PAW = {
  username: "13478996204",
  password: "e995b08cf6479b177799ad608bd06de8"
};
// 任务状态
export const TASK_STATUS = ["未下达", "已下达", "正在执行", "完成", "终止"];

// 点位的图表类型
export const POINT_CHART_TYPES = [
  {
    label: "原始记录表单",
    key: "1"
  },
  {
    label: "历史任务查询",
    key: "2"
  },
  {
    label: "能源能耗",
    key: "3"
  }
];
